Optimal. Leaf size=141 \[ -\frac {C \sin (e+f x) (a \cos (e+f x))^{m+3} \, _2F_1\left (\frac {1}{2},\frac {m+3}{2};\frac {m+5}{2};\cos ^2(e+f x)\right )}{a^3 f (m+3) \sqrt {\sin ^2(e+f x)}}-\frac {B \sin (e+f x) (a \cos (e+f x))^{m+2} \, _2F_1\left (\frac {1}{2},\frac {m+2}{2};\frac {m+4}{2};\cos ^2(e+f x)\right )}{a^2 f (m+2) \sqrt {\sin ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 141, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {3010, 2748, 2643} \[ -\frac {B \sin (e+f x) (a \cos (e+f x))^{m+2} \, _2F_1\left (\frac {1}{2},\frac {m+2}{2};\frac {m+4}{2};\cos ^2(e+f x)\right )}{a^2 f (m+2) \sqrt {\sin ^2(e+f x)}}-\frac {C \sin (e+f x) (a \cos (e+f x))^{m+3} \, _2F_1\left (\frac {1}{2},\frac {m+3}{2};\frac {m+5}{2};\cos ^2(e+f x)\right )}{a^3 f (m+3) \sqrt {\sin ^2(e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2643
Rule 2748
Rule 3010
Rubi steps
\begin {align*} \int (a \cos (e+f x))^m \left (B \cos (e+f x)+C \cos ^2(e+f x)\right ) \, dx &=\frac {\int (a \cos (e+f x))^{1+m} (B+C \cos (e+f x)) \, dx}{a}\\ &=\frac {B \int (a \cos (e+f x))^{1+m} \, dx}{a}+\frac {C \int (a \cos (e+f x))^{2+m} \, dx}{a^2}\\ &=-\frac {B (a \cos (e+f x))^{2+m} \, _2F_1\left (\frac {1}{2},\frac {2+m}{2};\frac {4+m}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{a^2 f (2+m) \sqrt {\sin ^2(e+f x)}}-\frac {C (a \cos (e+f x))^{3+m} \, _2F_1\left (\frac {1}{2},\frac {3+m}{2};\frac {5+m}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{a^3 f (3+m) \sqrt {\sin ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.26, size = 118, normalized size = 0.84 \[ -\frac {\sqrt {\sin ^2(e+f x)} \cos (e+f x) \cot (e+f x) (a \cos (e+f x))^m \left (B (m+3) \, _2F_1\left (\frac {1}{2},\frac {m+2}{2};\frac {m+4}{2};\cos ^2(e+f x)\right )+C (m+2) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {m+3}{2};\frac {m+5}{2};\cos ^2(e+f x)\right )\right )}{f (m+2) (m+3)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.46, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (C \cos \left (f x + e\right )^{2} + B \cos \left (f x + e\right )\right )} \left (a \cos \left (f x + e\right )\right )^{m}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (C \cos \left (f x + e\right )^{2} + B \cos \left (f x + e\right )\right )} \left (a \cos \left (f x + e\right )\right )^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.38, size = 0, normalized size = 0.00 \[ \int \left (a \cos \left (f x +e \right )\right )^{m} \left (B \cos \left (f x +e \right )+C \left (\cos ^{2}\left (f x +e \right )\right )\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (C \cos \left (f x + e\right )^{2} + B \cos \left (f x + e\right )\right )} \left (a \cos \left (f x + e\right )\right )^{m}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (a\,\cos \left (e+f\,x\right )\right )}^m\,\left (C\,{\cos \left (e+f\,x\right )}^2+B\,\cos \left (e+f\,x\right )\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________